export function useDialog(active) {
  const visible = ref(false)

  function open(current = null) {
    active && (active.value = current)
    visible.value = true
  }

  return {
    visible,
    open
  }
}
